//
//  B_MineHeaderView.m
//  DreamOf
//
//  Created by 薛小刚 on 2018/8/16.
//  Copyright © 2018年 薛小刚. All rights reserved.
//

#import "B_MineHeaderView.h"

@implementation B_MineHeaderView

+ (instancetype) initB_MineHeaderView {
    B_MineHeaderView * mainViwe = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil].lastObject;
    [mainViwe setView];
    return mainViwe;
    
}

- (void) setView {
    WeakSelf(weSelf, self);
    self.B_userImageView.layer.masksToBounds = YES;
    self.B_userImageView.layer.cornerRadius = 48;
    self.B_userImageView.layer.borderColor = [UIColor whiteColor].CGColor;
    self.B_userImageView.layer.borderWidth = 3;
    [self.B_userImageView addTapActionWithBlock:^(UIGestureRecognizer *gestureRecoginzer) {
        if (weSelf.mineHeaderAction) {
            weSelf.mineHeaderAction(@"tx");
        }
    }];
    [self.B_signView addTapActionWithBlock:^(UIGestureRecognizer *gestureRecoginzer) {
        if (weSelf.mineHeaderAction) {
            weSelf.mineHeaderAction(@"qd");
        }
    }];
    [self.B_integralView addTapActionWithBlock:^(UIGestureRecognizer *gestureRecoginzer) {
        if (weSelf.mineHeaderAction) {
            weSelf.mineHeaderAction(@"jf");
        }
    }];
    [self.B_collectionView addTapActionWithBlock:^(UIGestureRecognizer *gestureRecoginzer) {
        if (weSelf.mineHeaderAction) {
            weSelf.mineHeaderAction(@"sc");
        }
    }];
}

- (IBAction)B_attentionButtonAction:(id)sender {
    if (self.mineHeaderAction) {
        self.mineHeaderAction(@"gz");
    }
}

- (IBAction)B_fansButtonAction:(id)sender {
    if (self.mineHeaderAction) {
        self.mineHeaderAction(@"fs");
    }

}

- (IBAction)B_footerPrintButtonAction:(id)sender {
    if (self.mineHeaderAction) {
        self.mineHeaderAction(@"zj");
    }
}
- (IBAction)B_WatchMerchantAction:(id)sender {
    if (self.mineHeaderAction) {
        self.mineHeaderAction(@"sj");
    }
    
}
- (IBAction)B_addAttentionAction:(id)sender {
    if (self.mineHeaderAction) {
        self.mineHeaderAction(@"jgz");
    }
}
@end
